<?

session_start();
$conn = @ mysql_connect("localhost", "root", "123456") or die("数据库链接错误");//@就是说出了错误不提示去不去都可以看你的需求
//print_r( $conn);
mysql_select_db("php", $conn);
mysql_query("set names 'utf8'"); //使用utf8中文编码;
error_reporting(0);

 //定义常量
 define(ALL_PS,"PHP100");

function htmtocode($content)
{
	$content=str_replace("\n","<br>",str_replace(" ","&nbsp;",$content));
	return $content;
}
?>